import React from 'react';

export default class 子组件 extends React.Component {

    state = {

    };
    componentDidMount(){
        this.props.fn('hello')
    }
    render() {
        return (
            <div>
                {/* 具名插槽 */}
                {this.props.prefix}
                {/* 插槽 */}
                {this.props.children}
                {/* {this.fn('hello')} */}
                {this.props.msg}
            </div>
        );
    }

}
